package view
{
	import flash.events.MouseEvent;
	import flash.geom.Point;
	
	import mx.controls.ComboBox;
	import mx.controls.listClasses.ListBase;

	public class DComBox extends ComboBox
	{
		public var dropLeft:int;
		public var dropTop:int;
		public function DComBox()
		{
			super();
			this.addEventListener(MouseEvent.CLICK,onClick);
		}
		
		private function onClick(event:MouseEvent):void{
			var gP:Point = localToGlobal(new Point(this.x,this.y));
			var list:ListBase = this.dropdown;
			list.x = gP.x - this.x + dropLeft;
			list.y = gP.y - this.y + this.height + dropTop;
		}
		
	}
}